package com.locAutoWeb.util;

public class AppUtilHelper {
	
	private static AppUtilHelper instancia;
	
	private AppUtilHelper(){
		
	}
	
	public static AppUtilHelper getInstancia(){
		if (instancia == null) {
			instancia = new AppUtilHelper();
		}
		return instancia;
	}
	
	public Long extraiIdString(String s){
		Long l = null;
		
		String aux = s.replace(" - ", "-");
		char[] arrayC = aux.substring(0, aux.length()).toCharArray();
		StringBuilder id = new StringBuilder();
		for (int i = 0; i < arrayC.length; i++) {
			if (arrayC[i] != '-') {
				id.append(arrayC[i]);
			}else{
				break;
			}
		}
		
		l = new Long(id.toString());
		
		return l;
	}

}
